package com.manager.common.tcp.constant;

public enum TcpDataType {

    HEARTBEAT(0,"心跳"),

    SENSITIVE_WORD(1,"敏感词"),

    MAC_ADDRESS(2,"MAC地址"),

    MIMICRY_HANDLE(3,"拟态判决操作"),

    DECISION_HANDLE(4,"裁决下发"),

    EXCEPTION_CONTAINER_REPORT(5,"异常容器上报"),

    CONTAINER_MANAGER(6,"容器管理"),

    TRAFFIC_EXCEPTION_GATHER(7,"网络攻击与异常流量数据采集"),

    DATA_PREPROCESS(8,"数据预处理"),

    ZYNQ_HANDLE(9,"ZYNQ特征提取"),

    TCP_TRAFFIC_GATHER(10,"TCP流量捕获"),

    HTTP_TRAFFIC_GATHER(11,"HTTP流量捕获"),

    SENSITIVE_WORD_SOFT(12,"敏感词软件"),

    RECEIPT(13,"回执"),

    TCP_FILE_REPORT(14,"文件上报"),

    OUTER_LOG_FILES_INFO(15,"提取离群日志");

    private int code;

    private String desc;

    private TcpDataType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TcpDataType getTcpDataType(int code) {
        TcpDataType[]  values = TcpDataType.values();
        for(TcpDataType value : values) {
            if(value.code == code) {
                return value;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
